import RouteWatcher from "./watcher"

export default function route() {

  const rw = new RouteWatcher()
  rw.start()

  return {

    name: '@vite-plugin-route',

    buildEnd() {
      rw.close()
    }
  }
}